{extend name="public/base"/}
{block name="content"}
<section class="content">

        <div class="box box-default">
            <div class="box-header with-border">
                <h3 class="box-title">
                    <a href="{:U('User/index')}" class="btn btn-primary">管理员列表</a>
                </h3>

                <h3 class="box-title">
                    <a href="{:U('User/add')}" class="btn btn-primary">添加管理员</a>
                </h3>

                <div class="box-tools pull-right">
                    <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
                </div>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form action="{:U('User/postEdit')}" method="post">
                <input type="hidden" name="id" value="{$_GET['id']}">

                <div class="box-body">
                    <div class="row">
                        <div class="col-md-12">
                            <table class="table table-bordered">
                                {if condition="session('id') eq 1"}
                                <tr>
                                    <th width="40">所属角色:</th>
                                    <td>
                                        <select name="group_id">
                                            <option value="">选择角色</option>
                                            {volist name="belong" id="data"}
                                            <option value="{$data.id}" {if condition="$data['id'] eq $group_id"
                                                    }selected{
                                            /if}>{$data.title}</option>
                                            {/volist}
                                        </select>
                                    </td>
                                </tr>
                                {/if}


                                <tr>
                                    <th width="140">管理员姓名:</th>
                                    <td><input class="form-control" type="text" name="username" value="{$edit.username}"
                                               size="30"></td>
                                </tr>
                                <tr>
                                    <th width="140">原密码:</th>
                                    <td><input class="form-control" type="password" name="lastpasswd" value=""
                                               size="30"></td>
                                </tr>
                                <tr>
                                    <th width="140">新密码:</th>
                                    <td><input class="form-control" type="password" name="passwd" value="" size="30">
                                    </td>
                                </tr>
                                <tr>
                                    <th width="140">确认新密码:</th>
                                    <td><input class="form-control" type="password" name="repasswd" value="" size="30">
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="box-footer">
                    <button type="submit" class="btn btn-primary">确认修改</button>
                </div>
            </form>
        </div>
        <!-- /.box -->

    <!-- /.col -->
</section>
{/block}